package com.ruoyi.system.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.domain.Patient;
import com.ruoyi.system.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/patient")
public class PatientController {
    @Autowired
    private PatientService patientService;

    /**
     * 根据患者ID获取患者信息
     */
    @GetMapping("/{patientId}")
    public AjaxResult getPatientInfo(@PathVariable("patientId") Long patientId) {
        System.err.println(AjaxResult.success(patientService.selectPatientById(patientId)));
        return AjaxResult.success(patientService.selectPatientById(patientId));
    }
}
